package main

import "fmt"

type Pet3 interface {
	eat()
	sleep()
}

type Dog3 struct {
	name string
	age  int
}

type Cat struct {
	name string
	age  int
}

func (dog Dog3) eat() {
	fmt.Println("dog eat...")
}

func (dog Dog3) sleep() {
	fmt.Println("dog sleep")
}

func (cat Cat) eat() {
	fmt.Println("cat eat...")
}

func (cat Cat) sleep() {
	fmt.Println("cat sleep...")
}

type Person3 struct {
	name string
}

func (per Person3) care(pet Pet3) {
	pet.eat()
	pet.sleep()
}

func main() {
	dog := Dog3{}
	cat := Cat{}
	per := Person3{}
	per.care(dog)
	per.care(cat)
}
